package com.link2room.quintesson.controller.inside;


import com.link2room.common.dto.result.base.BaseResultDto;
import com.link2room.quintesson.dto.param.base.TaobaoXrateplanHotelBaseParamDto;
import com.link2room.quintesson.dto.result.base.TaobaoXrateplanHotelDto;
import com.link2room.quintesson.facade.ITaobaoHotelRateplanFacadeService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Created by VegetaKo on 2017/1/12.
 */
@RestController
@RequestMapping("/in/TaobaoXrateplanHotels")
public class TaobaoXrateplanHotelsController {

    @Resource
    private ITaobaoHotelRateplanFacadeService taobaoHotelRateplanFacadeService;


    @RequestMapping(value = "/TaobaoXrateplanHotel",method= RequestMethod.PUT)
    public BaseResultDto updateTaobaoXrateplanHotel(
            @RequestBody TaobaoXrateplanHotelBaseParamDto taobaoXrateplanHotelBaseParamDto
    )throws Exception{
        TaobaoXrateplanHotelDto taobaoXrateplanHotelDto= taobaoHotelRateplanFacadeService.saveOrUpdateTaobaoXrateplanHotel(taobaoXrateplanHotelBaseParamDto);
        BaseResultDto l2rRs=new BaseResultDto();
        l2rRs.setResultCode(0);
        l2rRs.setResultInfo(taobaoXrateplanHotelDto);
        return l2rRs;
    }
}
